import { Component, OnInit , Injector} from '@angular/core';
import {CoreComponent, Dynamic, TabView} from 'pengesoft-ng-lib';
import {RecruitmentPlanMgeSvrService} from '../../services/recruitment-plan-mge-svr.service';
import {RecruitmentPlan} from '../../domains/recruitmentplan.domain';

@Component({
  selector: 'app-hrms',
  templateUrl: './hrms.component.html',
  styleUrls: ['./hrms.component.less']
})

@TabView('分组')
@Dynamic()
export class HrmsComponent extends CoreComponent implements OnInit {
  recuInfoList = [];
  tabs = [
    {
      name: '我的工作台',
      icon: 'apple',
      content: '工作台',
    },
    {
      name: '招聘管理',
      icon: 'android',
      content: '招聘管理',
    },
    {
      name: '员工管理',
      icon: 'apple',
      content: '员工管理',
    },
    {
      name: '组织管理',
      icon: 'android',
      content: '组织管理',
    },
    {
      name: '培训管理',
      icon: 'apple',
      content: '培训管理',
    },
    {
      name: '日志',
      icon: 'android',
      content: '日志',
    },
    {
      name: '日志',
      icon: 'android',
      content: '权限',
    },
  ];

  constructor(
    private injector: Injector,
    public recruSrv: RecruitmentPlanMgeSvrService) {
    super(injector);
  }

  ngOnInit(): void {
  }

  recruitment(): void{
    // 拿到申请列表
    this.recruSrv.getDetailList(new RecruitmentPlan()).then(res => {
      this.recuInfoList = res;
      // tslint:disable-next-line:no-unused-expression
    }, err => {
      this.nzMessageSvr.error(err.Msg);
    });
  }
}
